<?php


namespace App\Http\Controllers\Apps;


use App\Http\Controllers\AppController;
use App\Models\AppUsersFile;
use App\Models\Banner;
use App\Models\Product;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;

class Home extends AppController
{

    public function banner(Request $request)
    {
        $elem = Banner::latest()
                ->where('show',1);

        return $this->ReturnSuccessInfo([
            'list'  => $elem->get()
        ]);
    }

    public function product(Request $request)
    {
        $elem = Product::latest()
                ->where('status',1)
                ->limit(10);

        return $this->ReturnSuccessInfo([
            'list'  => $elem->get()
        ]);
    }


}
